package com.itheima.a07regexdemo1;

public class RegexDemo8 {
    public static void main(String[] args) {
        //口吃替换

        String s="我要要学学学学编编编编程程程程";

        String string = s.replaceAll("(.)\\1+", "$1");
        System.out.println(string);
    }
}
